package com.gy.smartmanagement.process.processdevice.dagger;

import com.gy.smartmanagement.base.scope.FragmentScoped;
import com.gy.smartmanagement.process.processdevice.api.DeviceApiService;
import com.gy.smartmanagement.process.processdevice.mvp.DeviceContract;

import dagger.Module;
import dagger.Provides;
import retrofit2.Retrofit;


/**
 * Created by MVPModule on 11/15/2019 16:36
 */
@Module
public class DeviceModule {
  private DeviceContract.IView mIView;

  public DeviceModule(DeviceContract.IView mIView) {
    this.mIView = mIView;
  }

  @FragmentScoped
  @Provides
  DeviceContract.IView providesDeviceContractIView() {
    return mIView;
  }

  @FragmentScoped
  @Provides
  DeviceApiService getDeviceApiService(Retrofit retrofit) {
    return retrofit.create(DeviceApiService.class);
  }
}